package com.cskaoyan.mapper;

import com.cskaoyan.bean.Student;
import org.apache.ibatis.annotations.Param;

public interface StudentMapper {

    // 分次查询
    // 根据学生id查询出学生信息以及这个学生对应的选课信息
    // select * from student where id = ?;
    // select c.*  from s_c as sc left join course  as c on sc.cid = c.id where sc.sid = ?
    Student selectStudentWithCourseListByStudentId(@Param("studentId") Integer studentId);


    // 连接查询
    // 根据学生id查询出学生信息以及这个学生对应的课程信息
    Student selectStudentByIdWithCourseListUseCrossQuery(@Param("studentId") Integer studentId);
}
